#pragma once
#include <cstdint>
#include <memory>
#include <string>
#include <vector>

#include "result.hpp"

class MulticastSender
{
public:
    explicit MulticastSender();
    ~MulticastSender();

    cpp::Result<> init(const std::string& multicast_address, uint16_t port, const std::string& interface_address = "0.0.0.0") const;

    cpp::Result<> release() const;

    cpp::Result<> send(const std::vector<uint8_t>& data) const;

private:
    class Impl;
    std::unique_ptr<Impl> pimpl;
};
